/*
 * Copyright 2008 p.langer
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 	http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package at.ac.tuwien.big.easyholdem.services;

import javax.jws.WebMethod;
import javax.jws.WebService;

import at.ac.tuwien.big.easyholdem.poker.Cards;
import at.ac.tuwien.big.easyholdem.probsim.HoldemProbability;
import at.ac.tuwien.big.easyholdem.probsim.ProbabilitySimulator;

/**
 * <p>
 * The web service class that invokes the {@link ProbabilitySimulator}.
 * </p> 
 *
 * <p>
 * Created on 23.01.2008 at 15:36:39.
 * </p>
 *
 * @author Philip Langer <langer[at]big[dot]tuwien[dot]ac[dot]at>
 */
@WebService
public class ProbabilityService {
	
	/**
	 * Calculates the probabilities for the specified hold'em situation.
	 * @param playersCards the player's hole cards.
	 * @param boardCards the community (board) cards.
	 * @return the probabilites
	 */
	@WebMethod
	public HoldemProbability calculateProbabilities(Cards playersCards, Cards boardCards) {
		ProbabilitySimulator ps = new ProbabilitySimulator(playersCards, boardCards);
		return ps.simulate();
	}

}
